import request from '@/utils/request'

// 查询AllocationPlan列表
export function listAllocationPlan(query) {
  return request({
    url: '/AllocationPlan/list',
    method: 'get',
    params: query
  })
}

// 查询AllocationPlan详细
export function getAllocationPlan(allocationNo) {
  return request({
    url: '/AllocationPlan/' + allocationNo,
    method: 'get'
  })
}

// 新增AllocationPlan
export function addAllocationPlan(data) {
  return request({
    url: '/AllocationPlan',
    method: 'post',
    data: data
  })
}

// 修改AllocationPlan
export function updateAllocationPlan(data) {
  return request({
    url: '/AllocationPlan',
    method: 'put',
    data: data
  })
}

// 删除AllocationPlan
export function delAllocationPlan(allocationNo) {
  return request({
    url: '/AllocationPlan/' + allocationNo,
    method: 'delete'
  })
}

//根据订单编号获取调拨计划
export function getAllocationPlanByOrderNo(orderNo) {
  return request({
    url: '/AllocationPlan/getAllocationByOrderNo',
    method: 'post',
    data: orderNo
  })
}
